Class Sound#setSoundMode

Sound

Class Summary
Constructor Attributes Constructor Name and Description
 
Sound#setSoundMode(successCallback, errorCallback, options)
Sets Sound mode.

Class Detail

Sound#setSoundMode(successCallback, errorCallback, options)
Sets Sound mode. Each SoundMode has a set of predefined sound properties. And each sound modes can be changed with setSoundMode().
// Javascript code
function setSoundMode () {
  var options = {
		 mode : Sound.SoundMode.Standard,
		 balance : 20
	 };
    
  function successCb() {
     // Do something
  }

  function failureCb(cbObject) {
     var errorCode = cbObject.errorCode;
     var errorText = cbObject.errorText;
     console.log ("Error Code [" + errorCode + "]: " + errorText);
  }
    
  var sound = new Sound();
  sound.setSoundMode(successCb, failureCb, options);
}
Parameters:
{Function} successCallback
success callback function.
{Function} errorCallback
failure callback function.
{Object} options
PropertyTypeDescriptionRequired
modeStringSoundModerequired
balanceNumber-50 ~ +50optional
Since:
1.4
Returns:

If the method is successfully executed, success callback function is called without a parameter.
If an error occurs, failure callback function is called with a failure callback object as a parameter.

See:
Sound.getSoundMode()